<template>
	<view class="page-index">
		<view class="shopInfo" v-if="shopLoading && shopData" @click="edit()">
			<view class="shopNamebox">
				<view class="shopName">{{ shopData.name }}</view>
				<view v-if="shopData.check_status != 1" class="shopNamet"
					:style="{'color': shopData.check_status == 0 ? '#ff9900' : '#fa3534'}">
					{{shopData.check_status == 0 ? '审核中' : '审核失败'}}</view>
			</view>
			<uni-icons type="compose" size="30"></uni-icons>
		</view>
		<view class="addStore" @click="edit()" v-if="shopLoading && shopData == ''">添加门店</view>
		<uni-popup ref="popup" type="center">
			<view class="editBox">
				<!-- <view class="editItem">
					<view class="editTitle">门店名称</view>
					<view class="editInput">
						<uni-easyinput v-model="form.name" placeholder="请输入门店名称"></uni-easyinput>
					</view>
				</view>
				<view class="editItem">
					<view class="editTitle">门店负责人</view>
					<view class="editInput">
						<uni-easyinput v-model="form.name" placeholder="请输入门店负责人"></uni-easyinput>
					</view>
				</view> -->
				<uni-forms :value="form" :label-width="100" ref="form">
					<uni-forms-item label="门店名称" name="name"><uni-easyinput type="text" v-model="form.name"
							placeholder="请输入门店名称" style="flex-shrink: 1;" /></uni-forms-item>
					<uni-forms-item label="门店负责人" name="head"><uni-easyinput type="text" v-model="form.head"
							placeholder="请输入门店负责人" style="flex-shrink: 1;" /></uni-forms-item>
					<uni-forms-item label="门店手机" name="mobile"><uni-easyinput type="text" v-model="form.mobile"
							placeholder="请输入门店手机" style="flex-shrink: 1;" /></uni-forms-item>

					<uni-forms-item label="门店坐标" name="mobile">
						<view class="mapBox">
							轻点地图,可标注门店位置
							<map style="width: 100%; height: 200px;" :latitude="latitude" :longitude="longitude"
								:markers="covers" @tap="mapclick" :enable-scroll="false"></map>
						</view>
					</uni-forms-item>
					<uni-forms-item label="门店地址" name="address"><uni-easyinput type="text" v-model="form.address"
							placeholder="请选择门店地址" style="flex-shrink: 1;" disabled /></uni-forms-item>
					<view class=""
						style="text-align: center;display: flex;align-items: center;justify-content: center;font-size: 24rpx;color: #999;">
						<label class="radio" @click="radioClick()">
							<radio value="r2" :checked="checked" style="transform:scale(0.6)" color="#2994FF" />
						</label>
						阅读并同意万帮车服
						<text @click="goWebview('门店')" class="goWebview">《服务协议》</text>
					</view>
				</uni-forms>
				<view class="submitBox">
					<view class="close" @click="close()">取消</view>
					<view class="submit" @click="submit()">确认</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script src="./page.js"></script>

<style scoped lang="scss">
	@import 'page.scss';
</style>